import React, { forwardRef } from "react"
import Base from "./Base"
/**
 * @param {object} props
 * @param {React.RefObject} [props.ref]
 * @param {1 | 2 | 3 | 4 | 5 | 6} [props.heading] 标题级别，相当于 h1 h2 h3 h4 h5 h6
 * @param {'primary' | 'secondary' | 'success' | 'error' | 'warning'} [param.type] 文本类型
 * @param {boolean} [param.code] 代码块样式
 * @param {boolean} [param.disabled] 禁用状态
 * @param {boolean} [param.delete] 删除线样式
 * @param {boolean} [param.underline] 下划线样式
 * @param {string|string[]} [props.className] 节点类名
 * @param {React.CSSProperties} [props.style] 节点样式
 * @param {boolean | { color: string }} [param.mark] 标记样式
 * @param {boolean | (text:string,e) => void} [param.copyable] 开启复制功能
 * @param {boolean | (text:string) => void} [param.editable] 开启可编辑功能
 * @returns {React.ReactNode}
 */
const TitleComponent = (props, ref) => {
    const { heading = 1, ...rest } = props
    return <Base heading={heading} {...rest} componentType="Title" ref={ref} />
}
const Title = forwardRef(TitleComponent)
Title.displayName = "Title"
export default Title